package co.uniquindio.software.medisys.logica;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.EntityTransaction;
import javax.persistence.Persistence;

import co.uniquindio.software.medisys.entidades.Cita;
import co.uniquindio.software.medisys.entidades.Paciente;

public class gestorCitas
{
	EntityManagerFactory emf = Persistence.createEntityManagerFactory("MedisysPU");
	
	public void guardarCitas(Cita cita){
		
		EntityManager em = emf.createEntityManager();
		EntityTransaction et = em.getTransaction();
		et.begin();
		em.persist(cita);
		em.flush();
		et.commit();
	}
	
}
